<template>
    <div>
      <div v-if="flag">
        <input type="text" @blur="flag=!flag" />
      </div>
      <div v-else>
        <button @click="btn">{{ tt }}</button>
      </div>
    </div>
  </template>

  <script>
  export default {
    model:{
      prop:'tt'
    },
    props: {
      tt: {
        type: String
      }
    },
    data () {
      return {
        flag: false
      }
    },
    created () {
    },
    computed: {
    },
    directives: {
      focus: {
        inserted (el) {
          el.focus()
        }
      }
    },
    methods: {
      btn () {
        this.flag = true
  
      }
    }
  }
  </script>
  <style lang='less'  scoped>
  </style>